﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="article_list.aspx.cs" Inherits="ByteSite.Web.admin.article.article_list" ValidateRequest="false" %>
<%@ Import namespace="ByteSite.Common" %>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0,user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>内容管理</title>
<link rel="stylesheet" type="text/css" href="../../scripts/artdialog/ui-dialog.css" />
<link rel="stylesheet" type="text/css" href="../skin/default/style.css" />
<link href="../skin/uikit/css/uikit.min.css" rel="stylesheet" />
<script type="text/javascript" src="../skin/uikit/js/uikit.min.js"></script>
<script type="text/javascript" src="../skin/uikit/js/uikit-icons.min.js"></script>
<script type="text/javascript" src="../../scripts/jquery/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="../../scripts/jquery/jquery.lazyload.min.js"></script>
<script type="text/javascript" src="../../scripts/artdialog/dialog-plus-min.js"></script>
<script type="text/javascript" src="../../scripts/xm-select/xm-select.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/laymain.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/common.js"></script>
<script type="text/javascript">
    $(function () {
        //图片延迟加载
        $(".pic img").lazyload({ effect: "fadeIn" });
        //点击图片链接
        $(".pic img").click(function () {
            var linkUrl = $(this).parent().parent().find(".foot a").attr("href");
            if (linkUrl != "") {
                location.href = linkUrl; //跳转到修改页面
            }
        });
    });
</script>
</head>

<body class="mainbody">
<form id="form1" runat="server">


<!--工具栏-->
<div class="uk-grid-match uk-child-width-auto uk-flex-between uk-grid">
    <div class="uk-first-column">
        <div class="uk-panel">
            <div class="uk-button-group uk-first-column">
                <a class="uk-button uk-button-default" uk-icon="check" href="javascript:;" onclick="checkAll(this);" uk-tooltip="全选"></a>
                <a class="uk-button uk-button-default" uk-icon="plus" href="article_edit.aspx?channel_id=<%=this.channel_id %>&action=<%=DTEnums.ActionEnum.Add %>" uk-tooltip="新增"></a>
                <asp:LinkButton ID="btnSave" runat="server" uk-icon="cloud-upload" CssClass="uk-button uk-button-default" onclick="btnSave_Click" uk-tooltip="保存"></asp:LinkButton>
                <asp:LinkButton ID="btnDelete" runat="server" uk-icon="trash" CssClass="uk-button uk-button-default" OnClientClick="return ExePostBack('btnDelete','本操作会删除本类别及下属子类别，是否继续?');" onclick="btnDelete_Click" uk-tooltip="删除"></asp:LinkButton>
                <asp:LinkButton ID="btnAudit" runat="server" uk-icon="file-edit" CssClass="uk-button uk-button-default" OnClientClick="return ExePostBack('btnAudit','审核后前台将显示该信息，确定继续吗?');" onclick="btnAudit_Click" uk-tooltip="审核通过"></asp:LinkButton>
                <div class="">                    
                    <button type="button" class="uk-button uk-button-default" uk-icon="list" uk-tooltip="选择更多筛选条件"></button>
                    <div class="uk-width-xxlarge" uk-dropdown="mode:click">
                        <div class="uk-dropdown-grid" uk-grid>
                            <div class="uk-first-column uk-width-1-2">
                                <asp:DropDownList ID="ddlMoveId" runat="server" CssClass="uk-select" AutoPostBack="True" onselectedindexchanged="ddlMoveId_SelectedIndexChanged"></asp:DropDownList>
                            </div>
                            <div class="uk-width-1-2">
                                <asp:DropDownList ID="ddlCategoryId" runat="server" CssClass="uk-select" AutoPostBack="True" onselectedindexchanged="ddlCategoryId_SelectedIndexChanged"></asp:DropDownList>
                            </div>
                            <div class="uk-width-1-2">
                                <asp:DropDownList ID="ddlProperty" runat="server" CssClass="uk-select" AutoPostBack="True" onselectedindexchanged="ddlProperty_SelectedIndexChanged">
                                    <asp:ListItem Value="" Selected="True">所有属性</asp:ListItem>
                                    <asp:ListItem Value="isLock">待审核</asp:ListItem>
                                    <asp:ListItem Value="unIsLock">已审核</asp:ListItem>
                                    <asp:ListItem Value="isMsg">可评论</asp:ListItem>
                                    <asp:ListItem Value="isTop">置顶</asp:ListItem>
                                    <asp:ListItem Value="isRed">推荐</asp:ListItem>
                                    <asp:ListItem Value="isHot">热门</asp:ListItem>
                                    <asp:ListItem Value="isSlide">幻灯片</asp:ListItem>
                                </asp:DropDownList>
                            </div>
                            <div class="uk-width-1-2">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div>
        <div class="uk-panel">
            <div class="uk-margin" uk-margin>
                <asp:TextBox ID="txtKeywords" runat="server" CssClass="uk-input uk-form-width-medium" />
                <asp:LinkButton ID="lbtnSearch" runat="server" CssClass="uk-button uk-button-default" onclick="btnSearch_Click" uk-icon="search"></asp:LinkButton>
            </div>
        </div>
    </div>
</div>
<!--/工具栏-->

<!--列表-->
<div class="table-container">
  <!--文字列表-->
  <asp:Repeater ID="rptList1" runat="server" onitemcommand="rptList_ItemCommand">
  <HeaderTemplate>
  <table width="100%" border="0" cellspacing="0" cellpadding="0" class="uk-table uk-table-striped uk-table-justify uk-table-middle uk-table-hover uk-table-divider">
      <thead>
    <tr>
      <th width="6%">选择</th>
      <th class="uk-text-left">标题</th>
      <th width="12%">所属类别</th>
      <th width="16%">发布时间</th>
      <th width="65">排序</th>
      <th width="120">属性</th>
      <th width="10%">操作</th>
    </tr>
          </thead>
  </HeaderTemplate>
  <ItemTemplate>
    <tr>
      <td align="center">
        <asp:CheckBox ID="chkId" CssClass="uk-checkbox" runat="server" />
        <asp:HiddenField ID="hidId" Value='<%#Eval("id")%>' runat="server" />
      </td>
      <td class="uk-text-left"><a href="article_edit.aspx?action=<%#DTEnums.ActionEnum.Edit %>&channel_id=<%#this.channel_id %>&id=<%#Eval("id")%>"><%#Eval("title")%></a></td>
      <td><%#new ByteSite.BLL.article_category().GetTitle(Convert.ToInt32(Eval("category_id")))%></td>
      <td><%#string.Format("{0:g}",Eval("add_time"))%></td>
      <td><asp:TextBox ID="txtSortId" runat="server" Text='<%#Eval("sort_id")%>' CssClass="uk-input uk-form-width-xsmall" onkeydown="return checkNumber(event);" /></td>
      <td>
        <div class="btn-tools">
          <asp:LinkButton ID="lbtnIsMsg" CommandName="lbtnIsMsg" runat="server" CssClass='<%# Convert.ToInt32(Eval("is_msg")) == 1 ? "selected" : ""%>' ToolTip='<%# Convert.ToInt32(Eval("is_msg")) == 1 ? "取消评论" : "设置评论"%>'><i class="iconfont icon-comment"></i></asp:LinkButton>
          <asp:LinkButton ID="lbtnIsTop" CommandName="lbtnIsTop" runat="server" CssClass='<%# Convert.ToInt32(Eval("is_top")) == 1 ? "selected" : ""%>' ToolTip='<%# Convert.ToInt32(Eval("is_top")) == 1 ? "取消置顶" : "设置置顶"%>'><i class="iconfont icon-top"></i></asp:LinkButton>
          <asp:LinkButton ID="lbtnIsRed" CommandName="lbtnIsRed" runat="server" CssClass='<%# Convert.ToInt32(Eval("is_red")) == 1 ? "selected" : ""%>' ToolTip='<%# Convert.ToInt32(Eval("is_red")) == 1 ? "取消推荐" : "设置推荐"%>'><i class="iconfont icon-good"></i></asp:LinkButton>
          <asp:LinkButton ID="lbtnIsHot" CommandName="lbtnIsHot" runat="server" CssClass='<%# Convert.ToInt32(Eval("is_hot")) == 1 ? "selected" : ""%>' ToolTip='<%# Convert.ToInt32(Eval("is_hot")) == 1 ? "取消热门" : "设置热门"%>'><i class="iconfont icon-hot"></i></asp:LinkButton>
          <asp:LinkButton ID="lbtnIsSlide" CommandName="lbtnIsSlide" runat="server" CssClass='<%# Convert.ToInt32(Eval("is_slide")) == 1 ? "selected" : ""%>' ToolTip='<%# Convert.ToInt32(Eval("is_slide")) == 1 ? "取消幻灯片" : "设置幻灯片"%>'><i class="iconfont icon-pic"></i></asp:LinkButton>
        </div>
      </td>
      <td align="center">
        <a href="article_edit.aspx?action=<%#DTEnums.ActionEnum.Copy %>&channel_id=<%#this.channel_id %>&id=<%#Eval("id")%>">复制</a>
        <a href="article_edit.aspx?action=<%#DTEnums.ActionEnum.Edit %>&channel_id=<%#this.channel_id %>&id=<%#Eval("id")%>">修改</a>
      </td>
    </tr>
  </ItemTemplate>
  <FooterTemplate>
  <%#rptList1.Items.Count == 0 ? "<tr><td align=\"center\" colspan=\"7\">暂无记录</td></tr>" : ""%>
  </table>
  </FooterTemplate>
  </asp:Repeater>
  <!--/文字列表-->
</div>
<!--/列表-->

<!--内容底部-->
<div class="line20"></div>
<div class="uk-grid-small uk-grid-match uk-child-width-expand uk-grid" uk-grid>
    <div class="uk-width-small uk-first-column">
        <div class="uk-panel">
            <div class="l-btns">
                <asp:TextBox ID="txtPageNum" runat="server" CssClass="uk-input uk-form-width-xsmall" onkeydown="return checkNumber(event);"
                 OnTextChanged="txtPageNum_TextChanged" AutoPostBack="True"></asp:TextBox><span> 条/页</span>
              </div>
        </div>
    </div>
    <div>
        <div class="uk-panel">
            <ul id="PageContent" runat="server" class="uk-pagination"></ul>
        </div>
    </div>
</div>
<!--/内容底部-->

</form>
</body>
</html>
